<template>
  <div>
    id:<input type="text" v-model="id"><br>
    名称:<input type="text" v-model="name"><br>
    <button @click="add">添加</button>
  </div>
</template>

<script>
export default {
  name:'cate_post',
  data(){
    return{
      id:'',
      name:''
    }
  },
  methods:{
    add(){
      let data = new FormData();
      data.append('id',this.id)
      data.append('name',this.name)
      this.axios.post('yt2/',this.data).then(res=>{
        this.$router.push('cate_get')
      })
    }
  }

}
</script>

<style>

</style>
